let num: number = 1
num = 12

let str: string = 'bob';
str = 'smith';

let list: Array<number> = [1, 2, 3];
// list.push("a")
list.push(4)
let strlist: Array<string> = ['1', '2', '3'];
strlist.push('4')

let anylist: Array<string | number> = ['1', '2', '3', 4, 5];
anylist.push('6')

let x: [string, number, string];
x = ['用户名', 1, '李雷']



interface userModel {
    id?: number,
    username: string,
    userage: number
}
function addUserInfo(user: userModel): void {

}
addUserInfo({ userage: 18, username: "leson", id: 1 })
let userList: Array<userModel> = [{ id: 1, username: "李雷", userage: 28 }, { username: "韩梅梅", userage: 10 }]

const addUserListInfo = (userList): void => {
    userList.forEach(item => {
        console.log('姓名:', item.username)
        console.log('年龄:', item.userage)
    })
}
addUserListInfo(userList)
const res = addUserListInfo(userList)
console.log(res)